<!-- <template >
  
    <div class="common-layout">
      <el-container>
        <el-header>看我</el-header>
        <el-container>
          <el-aside width="200px">Aside</el-aside>
          <el-main>Main</el-main>
        </el-container>
      </el-container>
    </div>
  
  </template>
  <script setup lang="ts">
  
  </script>
  
  <style scoped lang="scss">
  .common-layout {
    height: 800px;
  }
  
  </style> -->
<template>
  <div class="common-layout">
    <el-container>
      <el-aside width="200px">
        <el-menu
          active-text-color=""
          background-color="#123456"
          class="left-menu"
          default-active="2"
          text-color="#fff"
          router
        >
          <!-- 只有一级目录 -->
          <el-menu-item index="/home">
            <el-icon><document /></el-icon>
            <span>首页</span>
          </el-menu-item>
          <!-- 有一级和二级目录 -->

          <el-sub-menu index="1">
            <!-- 插槽--控制一级目录的标题 -->
            <template #title>
              <el-icon><location /></el-icon>
              <span>商品管理</span>
            </template>
            <!--二级菜单  -->

            <el-menu-item index="/projectList">
              <el-icon><document /> </el-icon>
              商品列表
            </el-menu-item>
            <el-menu-item index="/projectInfo"
              ><el-icon><document /></el-icon>商品发布</el-menu-item
            >

            <!-- 三级菜单 -->
            <!-- <el-sub-menu index="1-4">
                <template #title>item four</template>
                <el-menu-item index="1-4-1">item one</el-menu-item>
              </el-sub-menu> -->
          </el-sub-menu>
        </el-menu>
      </el-aside>
      <el-container>
        <el-header
          ><RouterLink to="/login">登录</RouterLink>  <hr>
          <RouterLink to="/zhuce">注册</RouterLink></el-header
        >
        <el-main>
          <router-view />
        </el-main>
      </el-container>
    </el-container>
  </div>
</template>

<script setup>
import { RouterLink } from 'vue-router'
</script>

<style scoped>
.left-menu {
  height: 100vh;
}
</style>
